<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>项目流转单管理</title>
	<meta name="decorator" content="default"/>
	<link rel="stylesheet" href="${ctxStatic}/common/bootstrap.min.css">
	<link rel="stylesheet" href="${ctxStatic}/common/AdminLTE.min.css">
	<link rel="stylesheet" href="${ctxStatic}/common/jeesite.css">
	<link rel="stylesheet" href="${ctxStatic}/common/jquery-ui.css">
	<script src="${ctxStatic}/jquery-validation/1.16/jquery.validate.js"></script>
	<script src="${ctxStatic}/jquery-validation/1.16/jquery.validate.extend.js"></script>
	<script src="${ctxStatic}/jquery-validation/1.16/localization/messages_zh_CN.js"></script>
	<script src="${ctxStatic}/jquery/jquery-ui.js"></script>
	<style type="text/css">
		#inputForm a{
			height: 30px;
			border-color: #ccc;
		}
		#tri_div span{
			height: 30px;
		    line-height: 23px;
		    margin: 0;
		    padding: 2px 8px 0 0;
		    font-size: 13px;
		    font-weight: 400;
		    cursor: pointer;
		}
		#tri_div input{
			margin: 0px;
		}
		
		#tri_div label{
			font-weight: normal;		
		}
		
		#tri_div1 span{
			height: 30px;
		    line-height: 23px;
		    margin: 0;
		    padding: 2px 8px 0 0;
		    font-size: 13px;
		    font-weight: 400;
		    cursor: pointer;
		}
		#tri_div1 input{
			margin: 0px;
		}
		
		#tri_div1 label{
			font-weight: normal;		
		}
		#subpackageCount tr{
			font-size: 13px;
		}
		#subpackageCount th{
			text-align: center;
			border-left: 1px solid #ddd;
			border-top: 1px solid #ddd;
		}
		#subpackageCount td{
		    text-align: center;
			border-left: 1px solid #ddd;
			border-top: 1px solid #ddd;
		}
		#subpackageCount input{
			height:30px;border-radius: 4px;
		}
	</style>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
			
			if('${lzd.noticeMedia}' == '4'){
				$("#ndcDiv").show();
			}else{
				$("#ndcDiv").hide();
			}
			
			if('${lzd.tenderWay}' == '8'){
				$("#twcDiv").show();
			}else{
				$("#twcDiv").hide();
			}
			
			if('${lzd.serveType}' == '4'){
				$("#serveMoney").show();
			}else{
				$("#serveMoney").hide();
			}

			if('${lzd.serveType}' == '2' || '${lzd.serveType}' == '3'){
				if('${lzd.serveType}' == "2"){
					$("#percentSpan").text("%");
				}else{
					$("#percentSpan").text("元");
				}
				$("#percent").show();
			}else{
				$("#percent").hide();
			}
			
			$("#noticeMediaSe").change(function(){
				var v = $("#noticeMediaSe option:selected").val();
				if(v == '4'){
					$("#ndcDiv").show();
				}else{
					$("#ndcDiv").hide();
				}
			});
			
			$("#tenderWaySe").change(function(){
				var v = $("#tenderWaySe option:selected").val();
				if(v == '8'){
					$("#twcDiv").show();
				}else{
					$("#twcDiv").hide();
				}
			});
			
			
			$("#serveType").change(function(){
				var v = $("#serveType option:selected").val();
				if(v == "4"){
					//$("#serveMoneyVal").val("");
					$("#serveMoney").show();
				}else{
					$("#serveMoney").hide();
				}
				
				if(v == "2" || v == "3"){
					if(v == "2"){
						$("#percentSpan").text("%");
					}else{
						$("#percentSpan").text("元");
					}
					$("#percent").show();
				}else{
					$("#percent").hide();
				}
			});
			
			if('${lzd.isSubpackage}' == '1'){
				$("#proMoney").hide();
				$("#subpackageCount").show();
				
			}else{
				$("#proMoney").show();
				$("#subpackageCount").hide();
			}
			
			$("#isSubpackage").change(function(){
				var v = $("#isSubpackage option:selected").val();
				if(v == "2"){
					$("#proMoney").show();
					$("#subpackageCount").hide();
				}else{
					$("#proMoney").hide();
					$("#subpackageCount").show();
				}
			});
			
			if('${lzd.tRequire.specialRequire}' == '2'){
				$("#trc_Div").show();
			}else{
				$("#trc_Div").hide();
			}
			
			$("#specialRequire").change(function(){
				var v = $("#specialRequire option:selected").val();
				if(v == "2"){
					$("#trc_Div").show();
				}else{
					$("#trc_Div").hide();
				}
			});
			
			var availableTags = ${buyUnitList};
			$( "#buyUnit" ).autocomplete({
		      source: availableTags,
		      select: function( event, ui ) {
		    	  var buyUnitName = ui.item.value;
		    	  $.ajax({
		    		  type: "GET",
		    		  url: "${ctx}/zx/lzd/getByBuyUnit?name=" + buyUnitName,
		    		  dataType: "json",
		    		  success: function(data){
		    			  //debugger;
		    			  $("#buyerPhone").val(data.buyerPhone);
		    			  $("#contact").val(data.contact);
		    		  }
		    	  });
	          }
		    });
		});
		/*============================================================*/
		function serveTypeFn(index){
			var v = $("#serveType" + index +" option:selected").val();
			if(v == "4"){
				//$("#serveMoneyVal").val("");
				$("#serveMoney" + index).show();
			}else{
				$("#serveMoney" + index).hide();
			}
			
			if(v == "2" || v == "3"){
				if(v == "2"){
					$("#percentSpan" + index).text("%");
				}else{
					$("#percentSpan" + index).text("元");
				}
				$("#percent" + index).show();
			}else{
				$("#percent" + index).hide();
			}
		}
		
		function addSectionFn(){
			var sectionIndex = parseInt($("#sectionIndex").val()) + 1;
			var htmlStr = "<tr>";
			htmlStr += "<td><div style=\"position: relative;\"><input name=\"sectionList["+ sectionIndex +"].sectionName\" maxlength=\"100\" class=\"form-control\"/></div></td>";
			htmlStr += "<td><div style=\"position: relative;\"><input name=\"sectionList["+ sectionIndex +"].budgetMoney\" maxlength=\"100\" class=\"form-control number\"/></div></td>";
			htmlStr += "<td><div style=\"position: relative;\"><input name=\"sectionList["+ sectionIndex +"].limitMoney\" maxlength=\"100\" class=\"form-control number\"/></div></td>";
			htmlStr += "<td><div style=\"position: relative;\"><input name=\"sectionList["+ sectionIndex +"].tenderPrice\" maxlength=\"100\" class=\"form-control number\"/></div></td>";
			htmlStr += "<td><div style=\"position: relative;\"><input name=\"sectionList["+ sectionIndex +"].discount\" maxlength=\"10\" class=\"form-control\"/></div></td>";
			//htmlStr += "<td><input name=\"sectionList["+ sectionIndex +"].earnestMoney\" maxlength=\"100\" class=\"form-control number\"/></td>";
			htmlStr += "<td style=\"text-align: left\">";
			htmlStr += "<select name=\"sectionList["+ sectionIndex +"].serveType\" style=\"width:35%\" id=\"serveType"+ sectionIndex +"\" onchange=\"serveTypeFn("+ sectionIndex +")\">";
			htmlStr += $("#serveType").html();
			htmlStr += "</select>";
			htmlStr += "<div id=\"percent"+ sectionIndex +"\" style=\"float: right;display: none;\">";
			htmlStr += "<input class=\"number\" style=\"width:180px;border: 1px solid #ccc;padding: 4px 6px;font-size: 14px\" id=\"percentVal"+ sectionIndex +"\" name=\"sectionList["+ sectionIndex +"].percent\"/><span class=\"add-on\" style=\"height: 30px;padding-left: 4px\" id=\"percentSpan"+ sectionIndex +"\"></span>";
			htmlStr += "</div>";
			htmlStr += "<div id=\"serveMoney"+ sectionIndex +"\" style=\"float: right;display: none;\">";
			htmlStr += "<input style=\"width:180px;border: 1px solid #ccc;padding: 4px 6px;font-size: 14px\" id=\"serveMoneyVal"+ sectionIndex +"\" name=\"sectionList["+ sectionIndex +"].serveMoney\" placeholder=\"请输入代理服务费内容\" /><span class=\"add-on\" style=\"height: 30px;\">&nbsp;&nbsp;&nbsp;&nbsp;</span>";
			htmlStr += "</div>";
			htmlStr += "</td>";
			htmlStr += "<td><input class=\"btn btn-danger btn-xsz\" style=\"padding: 1px 5px;font-size: 12px;line-height: 1.5\" type=\"button\" value=\"删除标段\" onclick=\"delSectionFn(this)\"></td>	";
			htmlStr += "</tr>";
			$("#sectionIndex").val(sectionIndex)
			var $table = $('table tbody');
			$table.append(htmlStr);
			// 初始化select
			$("#serveType"+ sectionIndex).select2();
		}
		
		function delSectionFn(obj){
			$(obj).parent().parent().remove();
		}
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/zx/lzd/">项目列表</a></li>
		<li class="active"><a href="${ctx}/zx/lzd/restartForm?id=${lzd.id}&sectionId=${lzd.sectionId}">重新开标</a></li>
	</ul>
	<div class="main-content">
	  <div class="box box-main">
		<form:form id="inputForm" modelAttribute="lzd" action="${ctx}/zx/lzd/save" method="post" class="form-horizontal">
			<c:choose>
				<c:when test="${empty lzd.resetLzdId}">
					<input name="resetLzdId" type="hidden" value="${lzd.id}">
				</c:when>
				<c:otherwise>
					<input name="resetLzdId" type="hidden" value="${lzd.resetLzdId}">
				</c:otherwise>
			</c:choose>
			<sys:message content="${message}"/>	
			<div class="box-body">
				<div class="form-unit">项目属性</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> 项目具体分类：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<sys:treeselect id="keyword" name="keyword.id" value="${lzd.keyword.id}" labelName="keyword.name" labelValue="${lzd.keyword.name}"
									title="项目具体分类" url="/zx/keyword/treeData" cssClass="required" allowClear="true" cssStyle="width:100%;height:30px"/>
							</div>
						</div>
					</div>
					
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> 项目分类：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<sys:treeselect id="cgml" name="cgml.id" value="${lzd.cgml.id}" labelName="cgml.name" labelValue="${lzd.cgml.name}"
									title="项目分类" url="/zx/cgml/treeData" cssClass="required" allowClear="true" cssStyle="width:100%;height:30px"/>
							</div>
						</div>
					</div>
				</div>
				<div class="form-unit">基本信息</div>
				<div class="row">
					<%-- <div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> 项目编码：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="proNo" autocomplete="off" maxlength="100" class="form-control required" cssStyle="height:30px"/>
							</div>
						</div>
					</div> --%>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> 项目名称：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="proName" maxlength="100" autocomplete="off" class="form-control required" cssStyle="height:30px"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> 采购单位：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="buyUnit" id="buyUnit" maxlength="255" class="form-control required" cssStyle="height:30px"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 联系人：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<form:input path="tRequire.contact" id="contact" autocomplete="off" maxlength="100" class="form-control" cssStyle="height:30px"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
							<span class="required hide">*</span> 采购人电话：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="tRequire.buyerPhone" id="buyerPhone" autocomplete="off" maxlength="100" class="form-control" cssStyle="height:30px"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 项目负责人：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="proPic" autocomplete="off" maxlength="100" class="form-control" cssStyle="height:30px"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 标书完成时间：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<input name="endTime" type="text" readonly="readonly" maxlength="20"  style="width:100%;height:30px" class="Wdate"
									value="<fmt:formatDate value="${lzd.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
									onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
							</div>
						</div>
					</div>
				</div>
				<%-- <div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 标书制作人：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="tenderProducer" autocomplete="off" maxlength="255" class="form-control" cssStyle="height:30px"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 项目执行人：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<form:input path="proPerformer" autocomplete="off" maxlength="100" class="form-control" cssStyle="height:30px"/>
							</div>
						</div>
					</div>
				</div> --%>
				
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 执行流程：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<form:select path="executeSteps" cssStyle="width:100%;">
									<form:options items="${fns:getDictList('execute_steps')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 标书程序：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<form:select path="tenderProcedure" cssStyle="width:100%">
									<form:options items="${fns:getDictList('tender_procedure')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 资金来源：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8">
								<form:select path="fundsResources" cssStyle="width:100%">
									<form:options items="${fns:getDictList('funds_resources')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select>
							</div>
						</div>
					</div>
					
				</div>
				<div class="row">
					
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 公告媒体：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-4">
								<form:select path="noticeMedia" cssStyle="width:100%" id="noticeMediaSe">
									<form:options items="${fns:getDictList('notice_media')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select>
							</div>
							<div class="input-append col-sm-6" style="padding-left: 0px;" id="ndcDiv">
							  <form:textarea path="noticeMediaContent" rows="3" maxlength="500" class="form-control" cssStyle="border-radius: 4px;"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 招标方式：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-4">
								<form:select path="tenderWay" cssStyle="width:100%" id="tenderWaySe">
									<form:options items="${fns:getDictList('tender_way')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select>
							</div>
							<div class="input-append col-sm-6" style="padding-left: 0px;" id="twcDiv">
							  <form:textarea path="tenderWayContent" rows="3" maxlength="500" class="form-control" cssStyle="border-radius: 4px;"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 论证：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8" id="tri_div1">
								<form:checkboxes path="demonstrationArray" items="${fns:getDictList('demonstration')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> 备注信息：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-10">
								<form:textarea path="remarks" rows="4" maxlength="500" placeholder="请输入备注信息" class="form-control" cssStyle="border-radius: 4px;"/>
							</div>
						</div>
					</div>
				</div>
				<!-- 注意事项 -->
				<!-- 是否分标段 -->
				<div class="form-unit">是否分标段</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 是否分包/标段：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-4">
								<form:select path="isSubpackage" cssStyle="width:100%" id="isSubpackage">
									<form:options items="${fns:getDictList('is_subpackage')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select>
							</div>
							
						</div>
					</div>
				</div>						
				<input type="hidden" id="sectionIndex" value="${fn:length(lzd.sectionList)}"/>					
				<table class="table table-striped table-bordered table-condensed" id="subpackageCount" style="margin: 0px 10px 20px 10px;width: 98%;">
					<col width="210px"/>
					<col width="180px"/>
					<col width="180px"/>
					<col width="180px"/>
					<col width="180px"/>
					<!-- <col width="180px"/> -->
					<col width="400px"/>
					<col width=""/>
					<thead>
						<tr>	
							<td>标段名称</th>							
							<td>预算金额(<font style="color: red">万元</font>)</td>
							<td>最高限价(<font style="color: red">万元</font>)</td>
							<td>标书售价(<font style="color: red">元</font>)</td>
							<td>折扣</td>
							<!-- <td>保证金额(<font style="color: red">元</font>)</td> -->
							<td>代理服务费</td>								
						</tr>
					</thead>
					<tbody>
						<tr title="${lzd.sectionList[0].trashPro eq '0' ? '废标不允许操作' : ''}">
							<td>
								<div style="position: relative;">
									<form:input path="sectionList[0].sectionName" maxlength="100" class="form-control"/>
									<c:choose>
										<c:when test="${empty lzd.sectionList[0].resetSectionId}">
											<input name="sectionList[0].resetSectionId" value="${lzd.sectionList[0].id}" type="hidden">
										</c:when>
										<c:otherwise>
											<input name="sectionList[0].resetSectionId" value="${lzd.sectionList[0].resetSectionId}" type="hidden">
										</c:otherwise>
									</c:choose>
									
								</div>
							</td>
							<td><div style="position: relative;"><form:input path="sectionList[0].budgetMoney" maxlength="100" class="form-control number"/></div></td>
							<td><div style="position: relative;"><form:input path="sectionList[0].limitMoney" maxlength="100" class="form-control number"/></div></td>
							<td><div style="position: relative;"><form:input path="sectionList[0].tenderPrice" maxlength="100" class="form-control number"/></div></td>
							<td><div style="position: relative;"><form:input path="sectionList[0].discount" maxlength="10" class="form-control"/></div></td>
							<%-- <td><form:input path="sectionList[0].earnestMoney"  maxlength="100" class="form-control number"/></td> --%>
							<td style="text-align: left">
								<form:select path="sectionList[0].serveType" cssStyle="width:35%" id="serveType0" onchange="serveTypeFn(0)">
									<form:options items="${fns:getDictList('serve_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select>
								<!-- 判断编辑时的显示/隐藏 -->
								<c:if test="${not empty lzd.id}">
							
									<c:choose>
										<c:when test="${lzd.sectionList[0].serveType eq '2' || lzd.sectionList[0].serveType eq '3'}">
											<div id="percent0" style="float: right;">
												<form:input class="number" cssStyle="width:180px" id="percentVal0" path="sectionList[0].percent"/>
										   		<span class="add-on" style="height: 30px;" id="percentSpan0">
										   			<c:if test="${lzd.sectionList[0].serveType eq '2'}">%</c:if>
										   			<c:if test="${lzd.sectionList[0].serveType eq '3'}">元</c:if>
										   		</span>
											</div>
										</c:when>
										<c:otherwise>
											<div id="percent0" style="float: right;display: none;">
												<form:input class="number" cssStyle="width:180px" id="percentVal0" path="sectionList[0].percent"/>
										   		<span class="add-on" style="height: 30px;" id="percentSpan0"></span>
											</div>
										</c:otherwise>
									</c:choose>
									
									<c:choose>										
										<c:when test="${lzd.sectionList[0].serveType eq '4'}">
											<!-- 代理服务费内容 -->
											<div id="serveMoney0" style="float: right">
												<form:input cssStyle="width:180px" id="serveMoneyVal0" path="sectionList[0].serveMoney" placeholder="请输入代理服务费内容"/>
												<span class="add-on" style="height: 30px;">&nbsp;&nbsp;</span>
											</div>
										</c:when>
										<c:otherwise>
											<div id="serveMoney0" style="float: right;display: none;">
												<form:input cssStyle="width:180px" id="serveMoneyVal0" path="sectionList[0].serveMoney" placeholder="请输入代理服务费内容"/>
												<span class="add-on" style="height: 30px;">&nbsp;&nbsp;</span>
											</div>
										</c:otherwise>										
									</c:choose>
								</c:if>
								<!-- 判断新增时的显示/隐藏 -->
								<c:if test="${empty lzd.id}">
									<div id="percent0" style="float: right;display: none;">
										<form:input class="number" cssStyle="width:180px" id="percentVal0" path="sectionList[0].percent"/>
								   		<span class="add-on" style="height: 30px;" id="percentSpan0"></span>
									</div>
									<!-- 代理服务费内容 -->
									<div id="serveMoney0" style="float: right;display: none;">
										<form:input cssStyle="width:180px" id="serveMoneyVal0" path="sectionList[0].serveMoney" placeholder="请输入代理服务费内容" />
										<span class="add-on" style="height: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;</span>
									</div
								</c:if>
							</td>
															
						</tr>
						<c:if test="${not empty lzd.id}">
							<c:forEach items="${lzd.sectionList}" var="e" varStatus="vs" begin="1">
								<tr>
									<td>
										<div style="position: relative;"><form:input path="sectionList[${vs.index}].sectionName" maxlength="100" class="form-control"/>
										<c:choose>
											<c:when test="${empty e.resetSectionId}">
												<input name="sectionList[${vs.index}].resetSectionId" value="${e.id}" type="hidden">
											</c:when>
											<c:otherwise>
												<input name="sectionList[${vs.index}].resetSectionId" value="${e.resetSectionId}" type="hidden">
											</c:otherwise>
										</c:choose>
										</div>
									</td>
									<td><div style="position: relative;"><form:input path="sectionList[${vs.index}].budgetMoney" maxlength="100" class="form-control number"/></div></td>
									<td><div style="position: relative;"><form:input path="sectionList[${vs.index}].limitMoney" maxlength="100" class="form-control number"/></div></td>
									<td><div style="position: relative;"><form:input path="sectionList[${vs.index}].tenderPrice" maxlength="100" class="form-control number"/></div></td>
									<td><div style="position: relative;"><form:input path="sectionList[${vs.index}].discount" maxlength="10" class="form-control"/></div></td>
									<%-- <td><form:input path="sectionList[${vs.index}].earnestMoney"  maxlength="100" class="form-control number"/></td> --%>
									<td style="text-align: left">
										<form:select path="sectionList[${vs.index}].serveType" cssStyle="width:35%" id="serveType${vs.index}" onchange="serveTypeFn(${vs.index})">
											<form:options items="${fns:getDictList('serve_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
										</form:select>
										
										<c:choose>
											<c:when test="${e.serveType eq '2' || e.serveType eq '3'}">
												<div id="percent${vs.index}" style="float: right;">
													<form:input class="number" cssStyle="width:180px" id="percentVal${vs.index}" path="sectionList[${vs.index}].percent"/>
													<span class="add-on" style="height: 30px;" id="percentSpan${vs.index}">
														<c:if test="${e.serveType eq '2'}">%</c:if>
														<c:if test="${e.serveType eq '3'}">元</c:if>
													</span>
												</div>
											</c:when>
											<c:otherwise>
												<div id="percent${vs.index}" style="float: right;display: none;">
													<form:input class="number" cssStyle="width:180px" id="percentVal${vs.index}" path="sectionList[${vs.index}].percent"/>
													<span class="add-on" style="height: 30px;" id="percentSpan${vs.index}"></span>
												</div>
											</c:otherwise>	
										</c:choose>
										
										<c:choose>
											<c:when test="${e.serveType eq '4'}">
												<!-- 代理服务费内容 -->
												<div id="serveMoney${vs.index}" style="float: right">
													<form:input cssStyle="width:180px" id="serveMoneyVal${vs.index}" path="sectionList[${vs.index}].serveMoney" placeholder="请输入代理服务费内容"/>
													<span class="add-on" style="height: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;</span>
												</div>
											</c:when>
											<c:otherwise>
												<div id="serveMoney${vs.index}" style="float: right;display: none;">
													<form:input cssStyle="width:180px" id="serveMoneyVal${vs.index}" path="sectionList[${vs.index}].serveMoney" placeholder="请输入代理服务费内容"/>
													<span class="add-on" style="height: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;</span>
												</div>
											</c:otherwise>
										</c:choose>	
										
									</td>
																	
								</tr>
							</c:forEach>
						</c:if>
						
					</tbody>
				</table>
				<!-- 项目费用 -->
				<div id="proMoney">
					<div class="form-unit">项目费用</div>	
					<div class="row">
						<div class="col-xs-6">
							<div class="form-group">
								<label class="control-label col-sm-4" title="">
									<span class="required hide">*</span> 项目预算(<label style="font-weight: normal; color: red">万元</label>)：<i class="fa icon-question hide"></i>
								</label>
								<div class="col-sm-8">
									<form:input path="budgetMoney" maxlength="255" class="form-control number" cssStyle="height:30px"/>
								</div>
							</div>
						</div>
						<div class="col-xs-6">
							<div class="form-group">
								<label class="control-label col-sm-4" title="">
									<span class="required hide">*</span> 最高限价(<label style="font-weight: normal; color: red">万元</label>)：<i class="fa icon-question hide"></i>
								</label>
								<div class="col-sm-8">
									<form:input path="limitMoney" maxlength="255" class="form-control number" cssStyle="height:30px"/>
								</div>
							</div>
						</div>
					</div>
					
					<div class="row">
						<div class="col-xs-6">
							<div class="form-group">
								<label class="control-label col-sm-4" title="">
									<span class="required hide">*</span> 标书售价(<label style="font-weight: normal; color: red">元</label>)：<i class="fa icon-question hide"></i>
								</label>
								<div class="col-sm-8">
									<form:input path="tenderPrice" maxlength="255" class="form-control number" cssStyle="height:30px"/>
								</div>
							</div>
						</div>
						<div class="col-xs-6">
							<div class="form-group">
								<label class="control-label col-sm-4" title="">
									<span class="required hide">*</span> 造价费(<label style="font-weight: normal; color: red">元</label>)：<i class="fa icon-question hide"></i>
								</label>
								<div class="col-sm-8">
									<form:input path="cost" maxlength="255" class="form-control number" cssStyle="height:30px"/>
								</div>
							</div>
						</div>
					</div>					
					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="control-label col-sm-4" title="">
									<span class="required hide">*</span> 代理服务费：<i class="fa icon-question hide"></i>
								</label>
								<div class="col-sm-4">
									<form:select path="serveType" cssStyle="width:100%" id="serveType">
										<form:options items="${fns:getDictList('serve_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
									</form:select>
								</div>
								<div class="input-append col-sm-6" id="percent" style="padding-left: 0px;">
								   <input class="span2 number" id="percentVal" name="percent" value="${lzd.percent}" type="text" style="height: 30px;">
								   <span class="add-on" style="height: 30px;" id="percentSpan"></span>
								</div>
								<div class="input-append col-sm-6" id="serveMoney" style="padding-left: 0px;">
								  <form:textarea path="serveMoney" id="serveMoneyVal" placeholder="请输入代理服务费内容" rows="3" maxlength="500" class="form-control" cssStyle="border-radius: 4px;"/>
								</div>
							</div>
						</div>
						
					</div>
				</div>			
				
				<!-- 注意事项 -->
				<div class="form-unit">标书制作注意事项</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span>是否有特殊要求：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-4">
								<form:select path="tRequire.specialRequire" cssStyle="width:100% required" id="specialRequire">
									<form:options items="${fns:getDictList('special_require')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select>
							</div>
							<div class="input-append col-sm-6" id="trc_Div" style="padding-left: 0px;">
							  <form:textarea path="tRequire.requireContent" placeholder="请输入特殊要求内容" rows="3" maxlength="500" class="form-control" cssStyle="border-radius: 4px;"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span>完工期：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="tRequire.proEndDate" class="form-control" cssStyle="height:30px"/>
								
								<%-- <input name="tRequire.proEndDate" type="text" readonly="readonly" maxlength="20"  style="width:100%;height:30px" class="Wdate"
									value="<fmt:formatDate value="${lzd.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
									onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/> --%>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span>保质期：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:input path="expDate" class="form-control" cssStyle="height:30px"/>
							</div>
						</div>
					</div>
				</div>
				
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 付款方式：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">	
								<form:input path="tRequire.payWay" class="form-control" cssStyle="height:30px"/>
								<%-- <form:select path="tRequire.payWay" cssStyle="width:100%">
									<form:options items="${fns:getDictList('pay_way')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
								</form:select> --%>
								<%--  --%>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> 项目参数文件：<i class="fa   icon-question hide"></i></label>
							<div class="col-sm-8">
								<form:hidden id="proParamFile" path="proParamFile" htmlEscape="false" maxlength="100" class="input-xlarge"/>
								<sys:ckfinder input="proParamFile" type="files" uploadPath="/zx/proParamFile" selectMultiple="true"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span>评审指标：<i class="fa icon-question hide"></i>
							</label>
							<div class="col-sm-8" id="tri_div">
								<form:checkboxes path="tRequire.zbArray" items="${fns:getDictList('review_index')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</div>
						</div>
					</div>
				</div>
				
				<div class="form-actions" style="background-color: #fff">
					<shiro:hasPermission name="zx:lzd:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="重新开标"/>&nbsp;</shiro:hasPermission>
					<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)" style="background-color: #e7e7e7;"/>
				</div>
			</div>
			
		</form:form>
	</div>
</div>
</body>
</html>